package com.example.mapper;

import com.example.pojo.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 *UserMapper
 */

@Mapper
public interface UserMapper {
    List<User> findUsers();
    User findUserByUserName(@Param("admin_name") String admin_name);
    List<String> getPermissions(@Param("admin_name") String admin_name);

    void saveUser(String admin_name, String admin_password, String salt);

    void saveUser_row(@Param("username")String username,@Param("password")String password);
    /**
     * 存取Token
     *
     * @param admin_name
     * @param token
     * @return
     */
    void saveToken(String  admin_name, String token);
}
